package router

import (
	"database-platform/handler"
	"github.com/gin-gonic/gin"
)

func InitDatabaseRoutes(e *gin.Engine) *gin.RouterGroup {
	databaseApi := e.Group("/api/v1/databases")

	databaseApi.GET("", handler.ListDatabaseHandler)
	databaseApi.GET("/:id", handler.RetrieveDatabaseHandler)
	databaseApi.POST("", handler.InsertDatabaseHandler)
	databaseApi.PUT("/:id", handler.UpdateDatabaseHandler)
	databaseApi.DELETE("/:id", handler.DeleteDatabaseHandler)

	return databaseApi
}
